<template>
  <i class="iconfont icon-pifuqiehuan theme-switch" @click="toggleTheme"></i>
</template>

<script>
import { mapMutations } from "vuex";
import { mutations } from "@/store/modules/themeStore";

export default {
  name: "ThemeSwitch",
  methods: {
    ...mapMutations("themeStore", [mutations.TOGGLE_THEME]),
  },
};
</script>

<style lang="less" scoped>
.theme-switch {
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}
</style>
